<template>
  <a-form-item :name="formItem.name" :label="formItem.label" :rules="[formItem.rule]" :extra="formItem.extra"
    :style="{ marginLeft: formItem.marginLeft + 'px' }"
    :class="formItem.associated ? 'form-a-radio-group_associated' : 'form-a-number-input'">
    <div>
      <span class="beforeText" v-if="formItem.beforeText">{{ formItem.beforeText }}</span>
      <a-input-number :disabled="formItem.disabled" v-model:value="formItem.value" placeholder="请输入整数" :min="1"
        :max="100000" />
      <span class="afterText" v-if="formItem.afterText">{{ formItem.afterText }}</span>
    </div>
  </a-form-item>
</template>

<script lang="ts" setup>
import { ref, reactive } from "vue"
import { dataSourceType } from "@/type.d";
//props
const props = defineProps({
  formItem: {
    type: Object,
    default: {} as dataSourceType
  },


})
// const formItem: any = reactive({

// })
const formItem: any = reactive(props.formItem as any);
</script>

<style lang="less" scoped>
.ant-input-number {
  width: 136px;
}
</style>